package com.zhanyf.heilan.cg.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import com.zhanyf.heilan.cg.domain.DevelopProgress;
import com.zhanyf.heilan.cg.domain.DevelopType;

@Component
public interface DevelopTypeMapper {

	@Select("select count(*) from tb_developType where typeName=#{typeName} for update")
	public int getDevelopTypeCountByTypeName(String typeName);

	@Insert("insert into tb_developType(typeName) values(#{typeName})")
	public void addDevelopType(String typeName);

	@Select("select * from tb_developType order by typeName")
	public List<DevelopType> listDevelopTypes();

	public List<DevelopProgress> listDevelopProgressByDevelopType(@Param(value = "developTypeId") int developTypeId);
}
